
import Relay from "react-relay";

export default class GetPermissionMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getAllPermission }`;
    }

    getVariables() {
        return {
            argsInput: {
                enType: this.props.enType,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getAllPermissionPayload {
            getAllPermission {
                errorCode
                value
                totalResult
                id
                token
                permissionModels {
                    name
                    description
                    pid
                    menuName
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
         fragment on getAllPermissionPayload {
            getAllPermission {
                errorCode
                value
                totalResult
                id
                token
                permissionModels {
                    name
                    description
                    pid
                    menuName
                }
            }
                }
            `]
        }];
    }

}